package com.mass.waybill.records.service;

import com.mass.core.utils.AjaxResponse;
import com.mass.waybill.order.model.WbShippingOrder;
import com.mass.waybill.records.model.WbSterilisationRecords;

import java.util.List;

/**
 * @Author: ZSX
 * @Description: 冲销记录  service 接口
 */
public interface WbSterilisationRecordsService {

    /**
     * 分页条件查询应收金额
     *
     * @param wbShippingOrder
     * @param page
     * @param limit
     * @return
     */
    AjaxResponse findReceivables(WbShippingOrder wbShippingOrder, Integer page, Integer limit);

    /**
     * 条件查询应收金额
     *
     * @param wbShippingOrder
     * @return
     */
    List<WbShippingOrder> findReceivablesAll(WbShippingOrder wbShippingOrder);

    /**
     * 根据结算查询核销人信息
     *
     * @param settlementNumber
     */
    WbSterilisationRecords findBySettlementNumber(String settlementNumber);

    /**
     * 根据结算编号查询 订单冲销明细
     *
     * @param settlementNumber
     * @param isOrderCodeGroupBy 是否已订单编号分组查询冲销记录  1  分组(默认) 2 不分组
     * @return
     */
    List<WbShippingOrder> findOrderBySettlementNumber(String settlementNumber, Integer isOrderCodeGroupBy);

    /**
     * 批量添加
     *
     * @param list
     * @return
     */
    int insertBatch(List<WbSterilisationRecords> list);

    /**
     * 增加
     *
     * @param wbSterilisationRecords
     */
    int insert(WbSterilisationRecords wbSterilisationRecords);

    /**
     * 通过id删除
     *
     * @param wbSterilisationRecordsId
     */
    int delete(Long wbSterilisationRecordsId);

    /**
     * 修改
     *
     * @param wbSterilisationRecords
     */
    int update(WbSterilisationRecords wbSterilisationRecords);

    /**
     * 通过id查找
     *
     * @param wbSterilisationRecordsId
     * @return
     */
    WbSterilisationRecords selectById(Long wbSterilisationRecordsId);

    /**
     * 通过输入参数分页查找
     *
     * @param wbSterilisationRecords
     * @param page
     * @param limit
     * @return
     */
    AjaxResponse selectPage(WbSterilisationRecords wbSterilisationRecords, Integer page, Integer limit);

    /**
     * 根据核销记录主键ID   删除销售记录
     *
     * @param id
     * @return
     */
    int deleteRecords(Long id);

    /**
     * 查询冲销金额
     * @param orderCode
     * @return
     */
    String selectByOrderCode(String orderCode);
}
